package mpcs.controller
{
	import mpcs.NotiConst;
	import mpcs.model.LoginProxy;
	import mpcs.model.vo.UserVO;
	
	import org.puremvc.as3.interfaces.INotification;
	import org.puremvc.as3.patterns.command.SimpleCommand;
	
	/**
	 *  
	 * @author zhangzuoqiang
	 */
	public class LoginCommand extends SimpleCommand {
		
		private var proxy:LoginProxy;
		
		public function LoginCommand() {
			super();
			proxy = facade.retrieveProxy(LoginProxy.NAME) as LoginProxy;
		}
		
		override public function execute(notification:INotification):void{
			var name:String = notification.getName();
			switch(name){
				case NotiConst.S_LOGIN:
					proxy.sLogin(UserVO(notification.getBody()));
					break;
				
			}
		}
		
	}
}